#!/bin/bash

source $HOME/my/include/log.sh

function include()
{
    log_param_len 1 1 $#
    if [ "$?" != "0" ]; then
        return $?
    fi

    # ~/my/include
    myinclude_header=$HOME/my/include/$1.sh
    if [ -e $myinclude_header ]; then
        source $myinclude_header
    fi

    # 同目录
    dir_header=$(dirname $0)/$1.sh
    if [ -e $dir_header ]; then
        source $dir_header
    fi
}

include log
